{anchor:msg_retrievemetadatachanges_0}
!! RetrieveMetadataChanges message
!!! Constructor
!!!! new COSA.Request.RetrieveMetadataChanges(query, clientVersionStamp, deletedMetadataFilters, requestId)
|| Param || Type || Description ||
| query | {{COSA.MetadataFilterExpression}} | Query |
| clientVersionStamp | {{string}} | Client Version Stamp |
| deletedMetadataFilters | [COSA.DeletedMetadataFilters|COSA.Const Namespace#enum_deletedmetadatachanges_0] | Deleted Metadata Filters |
| requestId _(optional)_ | {{string}} | Request unique identifier (GUID) |
!!! Properties
|| Name || Type || Description ||
| query | {{COSA.MetadataFilterExpression}} | Query |
| clientVersionStamp | {{string}} | Client Version Stamp |
| deletedMetadataFilters | [COSA.DeletedMetadataFilters|COSA.Const Namespace#enum_deletedmetadatachanges_0] | Deleted Metadata Filters |
| requestId _(optional)_ | {{string}} | Request unique identifier (GUID) |
!!! Example
{code:javascript}
var subFilterExpression_0 = new COSA.MetadataFilterExpression(COSA.Const.FilterOperator.OR,
        [
            new COSA.MetadataConditionExpression(COSA.Const.MetadataConditionOperator.Equals, 'IsDuplicateDetectionEnabled', new COSA.XrmBoolean(true)),
            new COSA.MetadataConditionExpression(COSA.Const.MetadataConditionOperator.NotEquals, 'IconLargeName', null)
        ]),
        rootFilterExpression_0 = new COSA.MetadataFilterExpression(COSA.Const.FilterOperator.AND,
            [
                new COSA.MetadataConditionExpression(COSA.Const.MetadataConditionOperator.Equals, 'IsCustomEntity', new COSA.XrmBoolean(true))
            ],
            [
                subFilterExpression_0
            ]
        ),
        attributeQuery = new COSA.AttributeQueryExpression(
            new COSA.MetadataFilterExpression(COSA.Const.FilterOperator.AND,
                [
                    new COSA.MetadataConditionExpression(COSA.Const.MetadataConditionOperator.Equals,
                        'Format',
                        new COSA.DateTimeFormat(COSA.Const.DateTimeFormat.DateAndTime))
                ]
            ),
            ['Format', 'LogicalName']
        ),
        entityQueryExpression_0 = new COSA.EntityQueryExpression( rootFilterExpression_0,
            ['LogicalName', 'IconLargeName', 'IsDuplicateDetectionEnabled', 'Attributes', 'OneToManyRelationships'],
            attributeQuery
        ),
        retrieveMetadataChangesRequest_0 = new COSA.Request.RetrieveMetadataChanges(entityQueryExpression_0);

retrieveMetadataChangesRequest_0.execute(function ( resp ) { console.log('RetrieveMetadataChanges'); });

var rootFilterExpression_1 = new COSA.MetadataFilterExpression(COSA.Const.FilterOperator.AND, [
    new COSA.MetadataConditionExpression(COSA.Const.MetadataConditionOperator.Equals, 'IsCustomEntity', new COSA.XrmBoolean(true))
]),
    retrieveMetadataChanges_1 = new COSA.Request.RetrieveMetadataChanges(new COSA.EntityQueryExpression(
        rootFilterExpression_1,
        []
    ), '', COSA.DeletedMetadataFilters(COSA.Const.DeletedMetadataFilters.All));

retrieveMetadataChanges_1.execute(function ( e ) { console.log('retrieveMetadataChanges1'); });
{code:javascript}

[Back to Top|#tbl_contents_0]